<template>
    <el-dialog v-model="isshowDiong" title="Warning" width="30%" center>
    <span>
      It should be noted that the content will not be aligned in center by
      default
    </span>
        <template #footer>
				<span class="dialog-footer">
					<el-button @click="onCancel" size="small">取 消</el-button>
					<el-button type="primary" @click="onSubmit" size="small">新 增</el-button>
				</span>
        </template>
    </el-dialog>
</template>

<script lang="ts">
    import { ref,reactive,toRefs} from 'vue'
    export default {
        name: "index",
        setup(props:any,{emit}:any){
            const state = reactive({
                isshowDiong:false
            })

            const openDialog =(row)=>{
                console.log(row)
                state.isshowDiong = true
            }
            const closeDialog = () =>{
                state.isshowDiong = false
            }
            const onCancel = () =>{
                closeDialog()
            }
            const onSubmit = () =>{
                closeDialog()
            }
            return{
                onCancel,
                onSubmit,
                closeDialog,
                openDialog,
                ...toRefs(state)
            }
        },
    }
</script>

<style scoped lang="scss">

</style>
